package com.woniuxy.food.client.foodskuclient;

import com.woniuxy.food.client.param.SearchFoodSkuByConditionParam;
import com.woniuxy.food.client.result.FoodSkuClientDto;
import common.WoniuPage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import result.Result;

import java.util.List;

@FeignClient(contextId = "foodSkuQueryClient",name = "food")
public interface FoodSkuQueryClient {
    @GetMapping("/searchFoodSkuByCondition")
    public Result<WoniuPage<FoodSkuClientDto>> searchFoodSkuByCondition(@SpringQueryMap SearchFoodSkuByConditionParam param);

    @GetMapping("/searchFoodSkuByQQC")
    public Result<FoodSkuClientDto> searchFoodSkuByQQC(@RequestParam("ids") Integer[] ids);

    @GetMapping("/searchFoodSkuById")
    public Result<FoodSkuClientDto> searchFoodSkuById(@RequestParam("skuId") Integer skuId);

    @GetMapping("/searchFoodSkuBySpuId")
    public Result<List<FoodSkuClientDto>> searchFoodSkuBySpuId(@RequestParam("storeId") Integer storeId, @RequestParam("spuId") Integer spuId);
}
